package com.qf.entity;

/**
 * @author 常肖飞先生
 * @version V1.0
 * @Project 0511_3
 * @Package com.qf.entity
 * @Description: 用户实体类
 * @Date 2022/5/11 22:03
 */
public class User {
    //id，用户名，密码
    //基本数据类型的包装类型值可以为空
    private Integer id;
    private String username;
    private String password;
    private String gender;
    private int age;
    private Book book;

    public User() {
    }

    public User(String username, String gender, int age) {
        this.username = username;
        this.gender = gender;
        this.age = age;
    }

    public User(int id, String username, String password) {
        this.id = id;
        this.username = username;
        this.password = password;
    }

    public Book getBook() {
        return book;
    }

    public void setBook(Book book) {
        this.book = book;
    }

    public User(String username, String password) {

        this.username = username;
        this.password = password;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
